<?php
// +-------------------------------------------------------------------------+
// | PHP Version 5                                                           |
// +-------------------------------------------------------------------------+
// | ImaEngine - web development framework                                   |
// | Copyright (c) 2006-2007 Sardar Yumatov <ja.doma@gmail.com>              |
// +-------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or modify it |
// | under the terms of the GNU Lesser General Public License as published   |
// | by the Free Software Foundation; either version 2.1 of the License, or  |
// | (at your option) any later version.                                     |
// |                                                                         |
// | This library is distributed in the hope that it will be useful, but     |
// | WITHOUT ANY WARRANTY; without even the implied warranty of              |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    |
// | See the GNU Lesser General Public License for more details.             |
// |                                                                         |
// | You should have received a copy of the GNU Lesser General Public        |
// | License along with this library; if not, write to the Free Software     |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +-------------------------------------------------------------------------+

/**
* Database specific exceptions.
* All these exceptions are derrived from common <tt>UnavailableException</tt> explaining what
* was unavailable.
*
* @package common.db
* @category Common
* @author Sardar Yumatov <ja.doma@gmail.com>
* @copyright Copyright &copy; 2006-2007 Sardar Yumatov
*
* @PHP5only
*/


if(!defined('PROCESS')) {
	header('HTTP/1.1 404 Not Found');
	die('NotFound');
}

require_once('lib/GenericExceptions.php');

/**
* Can not read data from database.
* By any reason (db not found, socket error etc) the data ba not be avilable.
* @author Sardar Yumatov <ja.doma@gmail.com>
*/
class DatabaseAccessFailedException extends UnavailableException {}

/**
* Can not write changes to the database.
* This exception can be thrown by write operations only. The transaction
* means here "the set of write operations", not the concrete database transaction
* mechanism.
* @author Sardar Yumatov <ja.doma@gmail.com>
*/
class DatabaseTransactionFailedException extends UnavailableException {}

?>